<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="${base}/css/health.css" />
		<title>${siteName}</title>
		<%@ include file="/common/commonstyle.jsp" %>
		<script type="text/javascript" >
			function sendMail() {
				var userName = $("#userName").val();
				var suject = $("#suject").val();
				var content = $("#contents").val();
				if("" != userName.trim()) {
 					if(!new RegExp(regexEnum.Illegal).test(userName)) {
	 					jAlert("姓名中包含非法字符！");
	 					return;
 					}
				} else {
 					jAlert("请填写姓名！");
 					return;
				}
				if("" != suject.trim()) {
 					if(!new RegExp(regexEnum.Illegal).test(suject)) {
	 					jAlert("主题中包含非法字符！");
	 					return;
 					}
				} else {
 					jAlert("请填写主题！");
 					return;
				}
				if(500 < content.trim().length) {
 					jAlert("意见反馈最大长度为500个字符！");
 					return;
				} else if("" != content.trim()) {
 					if(!new RegExp(regexEnum.Illegal).test(content)) {
	 					jAlert("意见反馈中包含非法字符！");
	 					return;
 					}
				} else {
 					jAlert("请填写意见反馈！");
 					return;
				}
				$.ajax({
					url : "${base}/contactSendMail",
					type : "post",
					data:{
						userName : userName,
						suject : suject,
						content : content
					},
					success: function (result) {
						jAlert("谢谢您提交成功！我们会做得更好的！");
					}
				});
			}
		</script>
	</head>
	<body>
		<div class="main">
            <%@ include file="/common/header.jsp" %>
            <div class="lianxi">
				<h1>Contact us 联系我们</h1>
			    <h2>感谢您的支持和关注，任何咨询或需要帮助请随时通过以下方式联系我们。</h2>
			    <h2>同时，也欢迎您对我们的产品及服务提出宝贵意见和建议，我们的产品及服务提出宝贵意见和建议，我们期待与您沟通，并将认真对待您的每一次反馈。</h2>
			    <ul>
			    	<li><img src="${base}/images/tu_14.jpg" alt="" />微信：xxxx（微信ID）</li>
			        <li><img src="${base}/images/tu_15.jpg" alt="" />Email：breakingfast@163.com</li>
			        <li><img src="${base}/images/tu_16.jpg" alt="" />客服电话：xxxx（周一至周五7：00-20：00）</li>
			    </ul>
				<h3>意见及反馈</h3>
			    <table width="500" border="0">
					<tr>
						<td width="80" height="40" align="left" valign="middle">姓名</td>
						<td height="40"><input id="userName" type="text" class="text_lx" maxlength="10" /></td>
					</tr>
					<tr>
						<td width="80" height="40" align="left" valign="middle">主题</td>
						<td height="40"><input id="suject" type="text" class="text_lx"  maxlength="50" /></td>
					</tr>
					<tr>
						<td width="80" align="left" valign="middle">意见反馈</td>
						<td><textarea id="contents" cols="" rows="" class="text_yj" ></textarea></td>
					</tr>
					<tr>
						<td width="80" height="40" align="left" valign="middle">&nbsp;</td>
						<td height="40"><input type="button" value="发送" class="btn_fs" onclick="sendMail()"></td>
					</tr>
			    </table>
			</div>
		    <%@ include file="/common/footer.jsp" %>
		</div>
	</body>
</html>
